<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登录界面</title>
		<style>
			* {
				margin: 0px;
				padding: 0px;
			}

			body {
				background: url(img/bgimg.jpg) no-repeat;
				background-size: cover;
			}
			
			.box {
				width: 400px;
				height: 600px;
				margin: 50px auto 0px;
				background-color: rgba(50, 35, 22, 0.67);
				border-radius: 20px;
			}

			img{
				width: 200px;
				height: 200px;
				margin: 50px 100px 0 100px;
			}
			.login {
				width: 400px;
				height: 160px;
				margin: 0px 75px 0px 75px;
			}
			.login input{
				height: 35px;
				width: 250px;
				outline: 0;
				border: 0;
				border-radius: 10px;
				font-size: 18px;
			}
			div button {
				background-color: transparent;
				font-size: 17px;
				margin: 0px 60px 100px 150px;
				border: 0;
				outline: 0;
				color:  white;
			}

			.submit{
				width: 240px;
				height: 50px;
				background-color: rgb(0, 204, 204);
				border: 0px;
				border-radius: 10px;
				font-size: 20px;
				color: white;
				margin: 0px 60px 50px 80px;
			}
		</style>
	</head>
	<body>
		<div class="box">
			<img src="img/登录 (1).png" alt="">
			<div class="login">
				<br>
				<input type="text" placeholder="请输入手机号" id="tel">
				<br><br>
				<input type="password" placeholder="请输入密码" id="psd">
			</div>
			<a href="" id="sub">
				<input type="submit" value="登录/注册" class="submit" onclick="ck(tel.value,psd.value)">
			</a>
			<button onclick="get()">忘记密码</button>
		</div>
	</body>
	<script>
		function ck(tel,psd){
			var r1 =/^[0-9]{11}$/,op=true;
			if(!r1.test(tel)){
				alert("手机号格式错误，请重新输入")
				op=false
			}
			if(psd=="") {
				alert("密码不能为空")
				op=false
			}
			if(op){
				var a=document.getElementById("sub")
				sub.setAttribute('href',"./一个人一组.html")
				alert("登录成功")
			}
		}
		function get(){
			alert("再好好想想")
		}
	</script>
</html>